/**
  * @file  : eeprom.h
  * @brief : 
  */
#ifndef INC_EEPROM_H_
#define INC_EEPROM_H_

#include "stm32f3xx_hal.h"

void EEPROM_Init(void);

/**
 * @brief Eeprom read/write apis. Never call these functions in ISR
 * @param addr The address operated
 * @param pData The pointer of data need to be operated
 * @param size Size amount of bytes of data to be operated
 * @param timeout Timeout duration
 * @return HAL status
 */
HAL_StatusTypeDef EEPROM_WriteBytes(uint16_t addr, uint8_t *pData, uint16_t size, uint32_t timeout);
HAL_StatusTypeDef EEPROM_ReadBytes(uint16_t addr, uint8_t *pData, uint16_t size, uint32_t timeout);

#endif /* INC_EEPROM_H_ */
